home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / PROGTOOL / FLI106C.ZIP;1 / BLCHREP.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1992-03-12  |  1011 b   |  52 lines

  1. //
  2. // The Fusion Library Interface for DOS
  3. // Version 1.06c
  4. // Copyright (C) 1990, 1991, 1992
  5. // Software Dimensions
  6. //
  7. // BlazeClass
  8. //
  9.  
  10. #ifndef __BCPLUSPLUS__
  11. #pragma inline
  12. #endif
  13.  
  14. #include "fli.h"
  15.  
  16. #ifdef __BCPLUSPLUS__
  17. #pragma hdrstop
  18. #endif
  19.  
  20. #define I asm
  21.  
  22. //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  23. //
  24. // CharacterRepeater()
  25. //
  26. // Repeats and displays a series of characters
  27. //
  28. //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  29.  
  30. void BlazeClass::CharacterRepeater(int X,int Y,int Width,int Color,
  31.   int Character)
  32. {
  33.   if (Width<1 || X>=WinWide || Y>=WinHigh)
  34.     return;
  35.  
  36.   int ScreenWidth = BlazeClass::QuickWidth;
  37.   int Locator = ((WinY+Y)*ScreenWidth)+((WinX+X)*2);
  38.  
  39.   if (X+Width>=WinWide)
  40.     Width=WinWide-X;
  41.  
  42.   void far *OUTPUT=BlazeClass::OUTPUT;
  43.   I les di,OUTPUT
  44.   I add di,Locator
  45.  
  46.   I cld
  47.   I mov al,byte ptr Character
  48.   I mov ah,byte ptr Color
  49.   I mov cx,Width
  50.   I rep stosw
  51. }
  52.